package de.clapp.backend;

import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JTabbedPane;

import de.clapp.backend.values.Settings;

@SuppressWarnings("serial")
public class MainWindow extends JFrame
{
    public MainWindow()
    {
        this.setTitle("ClApp");

        JTabbedPane tabbedPane = new JTabbedPane();
        tabbedPane.addTab("Clubs", new ClublistPanel());

        this.add(tabbedPane);
        // JFrame zentriert zur Bildschirmmitte, also JFrame in der Mitte des
        // Bildschirms positionieren:
        this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        this.setLocation(Toolkit.getDefaultToolkit().getScreenSize().width / 2 - (Settings.DefaultWindowSizeX / 2), Toolkit.getDefaultToolkit().getScreenSize().height / 2 - (Settings.DefaultWindowSizeY / 2));
        this.setSize(Settings.DefaultWindowSizeX, Settings.DefaultWindowSizeY);
        this.setVisible(true);
    }
}
